package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BizRiderAccountMapper;
import com.ruoyi.system.domain.BizRiderAccount;
import com.ruoyi.system.service.IBizRiderAccountService;

/**
 * 配送员账户Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-01
 */
@Service
public class BizRiderAccountServiceImpl implements IBizRiderAccountService 
{
    @Autowired
    private BizRiderAccountMapper bizRiderAccountMapper;

    /**
     * 查询配送员账户
     * 
     * @param riderId 配送员账户主键
     * @return 配送员账户
     */
    @Override
    public BizRiderAccount selectBizRiderAccountByRiderId(Integer riderId)
    {
        return bizRiderAccountMapper.selectBizRiderAccountByRiderId(riderId);
    }

    /**
     * 查询配送员账户列表
     * 
     * @param bizRiderAccount 配送员账户
     * @return 配送员账户
     */
    @Override
    public List<BizRiderAccount> selectBizRiderAccountList(BizRiderAccount bizRiderAccount)
    {
        return bizRiderAccountMapper.selectBizRiderAccountList(bizRiderAccount);
    }

    /**
     * 新增配送员账户
     * 
     * @param bizRiderAccount 配送员账户
     * @return 结果
     */
    @Override
    public int insertBizRiderAccount(BizRiderAccount bizRiderAccount)
    {
        bizRiderAccount.setCreateTime(DateUtils.getNowDate());
        return bizRiderAccountMapper.insertBizRiderAccount(bizRiderAccount);
    }

    /**
     * 修改配送员账户
     * 
     * @param bizRiderAccount 配送员账户
     * @return 结果
     */
    @Override
    public int updateBizRiderAccount(BizRiderAccount bizRiderAccount)
    {
        bizRiderAccount.setUpdateTime(DateUtils.getNowDate());
        return bizRiderAccountMapper.updateBizRiderAccount(bizRiderAccount);
    }

    /**
     * 批量删除配送员账户
     * 
     * @param ids 需要删除的配送员账户主键
     * @return 结果
     */
    @Override
    public int deleteBizRiderAccountByIds(String[] ids)
    {
        return bizRiderAccountMapper.deleteBizRiderAccountByIds(ids);
    }

    /**
     * 删除配送员账户信息
     * 
     * @param id 配送员账户主键
     * @return 结果
     */
    @Override
    public int deleteBizRiderAccountById(String id)
    {
        return bizRiderAccountMapper.deleteBizRiderAccountById(id);
    }
}
